package com.jiang.daily.Q2894;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/05/27 14:29
 */
class Solution {
    public int differenceOfSums(int n, int m) {
        int num1= 0, num2 = 0;
        for (int i = 0; i <= n; i++) {
            if (i % m != 0) num1 += i;
            else num2 += i;
        }
        return num1 - num2;
    }
}
